home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / modelers / nff / nff.rdm < prev    next >
Text File  |  1992-12-09  |  30KB  |  559 lines

  1. STANDARD PROCEDURAL DATABASES, by Eric Haines, 3D/Eye, Inc.
  2.  
  3. [Created while under contract to Hewlett-Packard FSD and HP Laboratories]
  4. Version 2.4, as of 5/1/88
  5.     address: 3D/Eye, Inc., 410 East Upland Road, Ithaca, NY 14850
  6.     e-mail: hpfcla!hpfcrs!eye!erich@hplabs.HP.COM
  7.  
  8. History
  9. -------
  10. This software package by Eric Haines is not copyrighted and can be used freely.
  11. Versions 1.0 to 1.5 released February to June, 1987 for testing.
  12. Version 2.0 released July, 1987.
  13. Version 2.1 released August, 1987 - corrected info on speed of the HP 320,
  14.     other minor changes to README.
  15. Version 2.2 released November, 1987 - shortened file names to <=12 characters,
  16.     procedure names to <= 32 characters, and ensured that all lines are <= 80
  17.     characters (including return character).
  18. Version 2.3 released March, 1988 - corrected gears.c to avoid interpenetration,
  19.     corrected and added further instructions and global statistics for ray
  20.     tracing to README.
  21. Version 2.4 released May, 1988 - fixed hashing function for mountain.c.
  22.  
  23. {This file uses tab characters worth 8 spaces}
  24.  
  25.  
  26. Introduction
  27. ------------
  28.  
  29.     This software is meant to act as a set of basic test images for ray tracing
  30. and hidden surface algorithms.  The programs generate databases of objects
  31. which are fairly familiar and "standard" to the graphics community, such as a
  32. fractal mountain, a tree, a recursively built tetrahedral structure, etc.  I
  33. created them originally for my own testing of a ray-tracer.  My hope is that
  34. these will be used by researchers to test algorithms.  In this way, research on
  35. algorithmic improvements can be compared on a more standard set of measures.
  36. At present, one researcher ray-traces a car, another a tree, and the question
  37. arises "How many cars to the tree?"  With these databases we may be comparing
  38. oranges and apples ("how many hypercubes to a timeshared VAX?"), but it sure
  39. beats comparing oranges and orangutans.
  40.  
  41.     Another use for these databases is to find how many vectors or polygons per
  42. second a particular machine can actually generate.  Talking with people
  43. at SIGGRAPH '86, I found that various vendors would say "well, they claim
  44. a rate of 5000 polygons/second, but their polygons are not our polygons".
  45. With these tests, their polygons are our polygons.  I admit a bias towards the
  46. structure of the HP-SRX ("Renaissance") display system and its display software
  47. "Starbase" in the way I structured the testing conditions (laid out later),
  48. but this comes fairly close to preliminary PHIGS+ standards.  For example,
  49. these databases are not kind to machines using the painter's algorithm, but I
  50. think this algorithm is inappropriate for good, general 3D modeling hardware.
  51. These databases do not use polygons where an intensity or color is given for
  52. each vertex, though such polygons are a feature of some machines (including
  53. the SRX).  They do include polygonal patches, where a normal is given for each
  54. vertex, as this feature seems fairly common.  Basically, if display hardware
  55. cannot provide 8 light sources, use of normals at vertices, specular shading,
  56. z-buffering, and perspective transformations, then I consider this machine
  57. somewhat ineffective for use in a 3D modeling environment (which is mostly all
  58. I care about--my personal bias).  If you do not, please tell me why!
  59.  
  60.     The images for these databases and other information about them can be
  61. found in "A Proposal for Standard Graphics Environments," IEEE Computer
  62. Graphics & Applications, November 1987, pages 3-5.  A corrected image of the
  63. tree appears in IEEE CG&A, January 1987, page 18.
  64.  
  65.     At present, the SPD package is available for the IBM PC on 360K 5.25"
  66. floppy for $5 from:  MicroDoc, c/o F.W. Pospeschil, 3108 Jackson Street,
  67. Bellevue, Nebraska  68005.
  68.  
  69.  
  70. File Structure
  71. --------------
  72.  
  73.     Six different procedural database generators are included.  These were
  74. designed to span a fair range of primitives, modeling structures, lighting
  75. and surface conditions, background conditions, and other factors.  A complexity
  76. factor is provided within each program to control the size of the database
  77. generated.
  78.  
  79. This software package contains the following files:
  80.  
  81.     README - what you are now reading
  82.     makefile - used to make the programs (in HP-UX Unix)
  83.     def.h - some useful "C" definitions
  84.     lib.h - globals and library routine declarations
  85.     lib.c - library of routines
  86.     balls.c - fractal ball object generator
  87.     gears.c - 3D array of interlocking gears
  88.     mountain.c - fractal mountain and 4 glass ball generator
  89.     rings.c - pyramid of dodecahedral rings generator
  90.     tetra.c - recursive tetrahedra generator
  91.     tree.c - tree generator
  92.  
  93. The compiled and linked programs will output a database in ASCII to stdout
  94. containing viewing parameters, lighting conditions, material properties, and
  95. geometric information.  The data format is called the 'neutral file format'
  96. (or NFF) and is outlined in lib.c.  This format is meant to be minimal and
  97. (hopefully) easy to attach to a user-written filter program which will convert
  98. the output into a file format of your choosing.
  99.  
  100.     Either of two sets of primitives can be selected for output.  If
  101. OUTPUT_FORMAT is defined as OUTPUT_CURVES, the primitives are spheres, cones,
  102. cylinders, and polygons.  If OUTPUT_FORMAT is set to OUTPUT_PATCHES, the
  103. primitives are simply polygonal patches and polygons (i.e. all other primitives
  104. are polygonalized).  In this case OUTPUT_RESOLUTION is used to set the amount
  105. of polygonalization of non-polygonal primitives.  In general, OUTPUT_CURVES is
  106. used for ray-trace timing tests, and OUTPUT_PATCHES for hidden surface and
  107. other polygon-based algorithm timings.
  108.  
  109.     SIZE_FACTOR is used to control the overall size of the database.  Default
  110. values have been chosen such that the maximum number of primitives less than
  111. 10,000 is output.  One purpose of SIZE_FACTOR is to avoid limiting the uses of
  112. these databases.  Depending on the research being done and the computing
  113. facilities available, a larger or smaller number of primitives may be desired.
  114. SIZE_FACTOR can also be used to show how an algorithm's time changes as the
  115. complexity increases.
  116.  
  117.     Other parameters (for example, branching angles for "tree.c" and the
  118. fractal dimension in "mountain.c") are included for your own enjoyment, and so
  119. normally should not be changed if the database is used for timing tests.
  120.  
  121.     Note that light intensities, ambient components, etc. are not specified.
  122. These may be set however you prefer.  The thrust of these databases is the
  123. testing of rendering speeds, and so the actual color should not affect these
  124. calculations.  An ambient component should be used for all objects.  A simple
  125. formula for an intensity for each light and the ambient component is the
  126. following:  sqrt(# lights) / (# lights * 2).
  127.  
  128.  
  129. Database Analysis
  130. -----------------
  131.  
  132.     The databases "mountain", and "tetra" consist of primitives of about the
  133. same size in a localized cluster, "balls" and "tree" are more varied clusters,
  134. and "rings" and "gears" are somewhat space-filling for the eye rays.  Some
  135. other facts about these databases:
  136.  
  137.               balls      gears      mountain     rings       tetra        tree
  138.               -----      -----      --------     -----       -----        ----
  139. primitives      SP         P           PS         YSP          P          OSP
  140.     (where S=sphere, P=polygon, Y=cylinder, O=cone, in # of objects order)
  141. total prim.    7382       9345        8196        8401        4096        8191
  142. polys         1417K       9345        8960        874K        4096        852K
  143. rend. polys    707K       4448        5275        435K        2496        426K
  144. ave. poly      0.26      173.6        53.2        2.95        35.4        0.09
  145. vectors       4251K      55300       26880       2688K       12288       2621K
  146. rend. vectors 4251K      54692       26074       2688K       12288       2621K
  147. ave. vector    0.59        7.6        12.5        2.57        11.1        0.26
  148. ave. # edges   3.00       5.92        3.00        3.08        3.00        3.08
  149.  
  150. lights          3          5           1           3           1           7
  151. background      0%         7%         34%          0%         81%         35%
  152. specular       yes        yes         yes         yes          no          no
  153. transmitter     no        yes         yes          no          no          no
  154.  
  155. eye hit rays 263169     245532      173422      263169       49806      170134
  156. reflect rays 175616     305561      355355      316621           0           0
  157. refract rays      0     208153      355355           0           0           0
  158. shadow rays  954544    2126105      362657     1087366       46150     1099748
  159.  
  160.     "total prim." is the total number of ray-tracing primitives (polygons,
  161. spheres, cylinders and cones) in the scene.  The number of polygons and vectors
  162. generated is a function of the OUTPUT_RESOLUTION.  The default value for this
  163. parameter is 4 for all databases.
  164.  
  165.     "polys" is the total number of polygons and polygonal patches generated
  166. when using OUTPUT_PATCHES.  "rend. polys" is the number of polygons actually
  167. sent to the z-buffer (i.e. not culled and not fully clipped).  "ave. poly" is
  168. the average rendered polygon size in pixels for a 512 x 512 resolution.  Note
  169. that this size is the average of the number of pixels put on the screen by all
  170. unculled, not fully clipped polygons.  Culled polygons are not counted, nor are
  171. pieces of polygons which are off-screen (clipped).  For this statistic, all
  172. transparent objects are considered opaque.  The area was calculated directly
  173. from the exact transformed vertices, not from the screen.  Note that in
  174. practice there usually are more pixels per polygon actually rendered, mostly
  175. due to the polygon edges being fully rendered.  It is because of this machine
  176. dependency that the purely geometric area is given.
  177.  
  178.     "vectors" is the total number of vectors generated.  "rend. vector" is the
  179. number of vectors which were not fully clipped off the screen (note that no
  180. culling takes place in vector testing).  "ave. vector" is similar to "ave.
  181. poly", being the average length of all rendered vectors in pixels.  Note that
  182. culling is not performed for vectors.  Again, the actual number of pixels
  183. rendered is machine dependent and could be different than this average vector
  184. length.
  185.  
  186.     "lights" is simply the number of lights in a scene.  "background" is the
  187. percentage of background color (empty space) seen directly by the eye for the
  188. given view.  It is calculated by "1 - ( eye hit rays/(513*513) )", since
  189. 513 x 513 rays are generated from the eye.  "specular" tells if there are
  190. reflective objects in the scene, and "transmitter" if there are transparent
  191. objects.
  192.  
  193.     "eye hit rays" is the number of rays from the eye which actually hit an
  194. object (i.e. not the background).  "reflect rays" is the total number of rays
  195. generated by reflection off of reflecting and transmitting surfaces.  "refract
  196. rays" is the number of rays generated by transmitting surfaces.  "shadow rays"
  197. is the sum total of rays shot towards the lights.  Note that if a surface is
  198. facing away from a light, or the background is hit, a light ray is not formed.
  199. The numbers given can vary noticeably from a given ray tracer, but should all
  200. be within about 10%.
  201.  
  202.     "K" means exactly 1000 (not 1024), with number rounded to the nearest K.
  203.  
  204.  
  205. Testing Procedures
  206. ------------------
  207.  
  208. Below are listed the requirements for testing various algorithms.  These test
  209. conditions should be realizable by most systems, and are meant to represent a
  210. common mode of operation for each algorithm.  Special features which the
  211. hardware supports (or standard features which it lacks) should be noted with
  212. the statistics.
  213.  
  214.  
  215. Hardware Vector Testing:
  216.  
  217.     1)  Two separate tests should be performed.  One test should be done at
  218.     a resolution of 512 x 512.  The second test should be done at the
  219.     maximum square resolution representable on the screen (e.g. the
  220.     HP SRX's resolution is 1280 x 1024, so run the tests at 1024 x 1024).
  221.     The first test is done so that the same sized polygons are used in
  222.     tests.  The second test is done to test the display hardware using a
  223.     more commonly used image resolution.
  224.  
  225.     2)  At least 24 bit planes should be used for color rendering, if
  226.     available.  If not, this should be noted and the best mapping mode
  227.     available should be used.
  228.  
  229.     3)  Vectors should be flat-shaded, with no hidden line removal performed
  230.     and no depth-cueing (but note these features if available).
  231.  
  232.     4)  The largest unit of display is the polygon.  This means that no
  233.     queueing of edge lists or optimization of move/draw commands can be
  234.     performed by the user.  All polygons must be rendered.  This will mean
  235.     that many edges will be drawn twice (since they are shared by
  236.     polygons).
  237.  
  238.     5)  Timings will consist of only the time spent on the polygon draw calls,
  239.     including the overhead of calling the display routine itself.  This
  240.     goal can most easily be realized by timing two versions of the testing
  241.     program.  One version reads the database and displays the results
  242.     normally.  The second version has all the system supplied vector
  243.     drawing commands removed, and so will output no vectors.  We can
  244.     determine the time spent actually displaying vectors by taking the
  245.     difference of these two timings.  This time divided by the total number
  246.     of vectors created by the database (listed in the table as "vectors")
  247.     is the vector rate for the database.
  248.  
  249.     6)  Two separate rates should be calculated from the average rates
  250.     computed.  One is the display rate, which is the average of the gears,
  251.     mountain, and tetra databases; the other is the throughput rate, which
  252.     is the average of the balls, rings, and tree databases.  The difference
  253.     is that the databases used to calculate the display rate are more
  254.     realistic as far as average polygon size presently used in hidden
  255.     surface comparisons.  This rate should better reflect the day-to-day
  256.     performance expected of a machine.  The databases for the throughput
  257.     rate are characterized by very small polygons, and so will reflect the
  258.     fastest speed of the hardware, as the effort to actually put the
  259.     vectors on the screen should be minimal.
  260.  
  261.  
  262. Hardware Shaded Hidden Surface Testing:
  263.  
  264.     1)  As in hardware vector testing, two tests should be performed at the
  265.     two resolutions.  A display and throughput rate should be calculated.
  266.  
  267.     2)  All polygons in the databases are guaranteed to be planar.  Polygons
  268.     do not interpenetrate, and only in "rings.c" does cyclical overlapping
  269.     occur.  The first three points of a polygon always form an angle less
  270.     than 180 degrees, and so can be used to compute the surface normal.
  271.     This computation should be done by the hardware if possible (and if
  272.     not, should be noted as such).
  273.  
  274.     3)  Polygons are one-sided for all databases (though transparent objects
  275.     may have to be treated as two-sided), and so the hardware can use the
  276.     surface normal to cull.  It is not valid to cull (or perform any other
  277.     clipping or shading function) using the software.
  278.  
  279.     4)  Polygons should be displayed using hidden surface rendering methods.
  280.     No software sorting or other irregular manipulation of the data is
  281.     allowed: the polygons should be rendered on a first-come first-served
  282.     basis.
  283.  
  284.     5)  Up to seven light sources and an ambient contribution are used in the
  285.     databases.  If the hardware does not have this many, note it and test
  286.     with the first few lights.  Lights do not fall off with distance.
  287.     Shadowing is not performed (though it's an incredible feature if it
  288.     is).
  289.  
  290.     6)  Light sources are positional.  If unavailable, assign the directional
  291.     lights a vector given by the light position and the viewing "lookat"
  292.     position.
  293.  
  294.     7)    Specular highlighting should be performed for surfaces with a specular
  295.     component.  The simple Phong distribution model is sufficient (though
  296.     note improvements, if any).
  297.  
  298.     8)  Polygonal patches should have smooth shading, if available.  In this
  299.     case a Gouraud interpolation of the colors calculated at the vertices
  300.     is the simplest algorithm allowed (again, note any more advanced
  301.     algorithms).
  302.  
  303.     9)  Transparency should be used if available, and the technique explained.
  304.     For example, the HP SRX uses "screen door" transparency, with a fill
  305.     pattern of a checkerboard.  Transparent objects are then rendered by
  306.     filling every other pixel.
  307.  
  308.     10) Overflow of color calculations is not guaranteed for these databases.
  309.     As such, this should be handled by scaling to the maximum color
  310.     contribution (e.g. r/g/b of 2 4 5 gets scaled to 0.4 0.8 1.0) if
  311.     available.  If not, simple clamping should be used and noted (e.g. an
  312.     r/g/b of 0.8 1.1 1.5 is output as 0.8 1.0 1.0).
  313.  
  314.     11) As in vector testing, timings should be done only for the actual
  315.     polygon rendering routines.  This means such costs as changing fill
  316.     color, vertex format, or other state record information is not counted
  317.     in the timing performed, but rather a flat-out speed test of the
  318.     shaded polygon rate is made.
  319.  
  320.  
  321. Other Hardware Tests:
  322.  
  323.     A number of tests which could also be performed, but that I have ignored
  324. for now, include the following:
  325.  
  326.     1)  Flat-shaded rendering: render polygons using only their fill colors.
  327.     Such renderings will look like mush, but would be useful for showing
  328.     the difference in speed for a flat-shade vs. shaded rendering.
  329.  
  330.     2)  Hidden-line rendering: render flat shaded polygons the same color as
  331.         the background, with edges a different color.  Culling can be used to
  332.     eliminate polygons.
  333.  
  334.     3)  No polypatch rendering: render polygonal patches but ignore their
  335.     normal per vertex values (i.e. render them as simple flat polygons).
  336.     Again, useful to show the time cost of using normals/vertex.
  337.     Pointless, of course, for the databases without polygonal patches.
  338.  
  339.     4)  No specular rendering: render without specular highlighting.  Useless
  340.     for the databases without specular highlighting.
  341.  
  342.     5)  Total cull and clip rendering: render with the lookat direction
  343.     reversed.  Change the at vector to be equal to ( 2*from - at ) and up
  344.     to be -up.  No objects will be displayed.  This test gives a sense of
  345.     the speed of the cull and clip hardware.
  346.  
  347.     Such a full battery of tests would yield some interesting results.
  348. Hardware could be compared in a large number of categories, allowing users to
  349. be able to select equipment optimized for their application.  I feel the most
  350. important rates are the vectors/second and the fully rendered polygons/second,
  351. as these two display methods bracket the gamut of realism offered by standard
  352. display hardware.
  353.  
  354.  
  355. Ray-Tracer Testing:
  356.  
  357.     1)  Assume the same conditions apply as in the shaded hidden surface
  358.     testing outline, except as noted below.  Note that the non-polygon
  359.     (OUTPUT_CURVES) format should be used for ray-tracing tests.
  360.  
  361.     2)  All opaque (non-transmitting) primitives can be considered one-sided
  362.     for rendering purposes, similar to how polygons were considered one-
  363.     -sided for hidden surface testing.  Only the outside of sphere, cone,
  364.     and cylinder primitives are viewed in the databases.
  365.  
  366.     3)  Render at a resolution of 512 x 512 pixels, shooting rays at the
  367.     corners (meaning that 513 x 513 eye rays will be created).  The four
  368.     corner contributions are averaged to arrive at a pixel value.  If this
  369.     is not done, note this fact.  No pixel subdivision is performed.
  370.  
  371.     4)  The maximum tree depth is 5 (where the eye ray is of depth 1).
  372.  
  373.     5)  All rays hitting only specular and transmitting objects spawn
  374.     reflection rays, unless the maximum ray depth was reached by the
  375.     spawning ray.  No adaptive tree depth cutoff is allowed; that is, all
  376.     rays must be spawned (adaptive tree depth is a proven time saver and
  377.     is also dependent on the color model used).
  378.  
  379.     6)  All rays hitting transmitting objects spawn refraction rays, unless
  380.     the maximum ray depth was reached or total internal reflection occurs.
  381.     Transmitting rays should be refracted using Snell's (i.e. should not
  382.     pass straight through an object).  If total internal reflection occurs,
  383.     then only a reflection ray is generated at this node.
  384.  
  385.     7)  A shadow ray is not generated if the surface normal points away from
  386.     the light.
  387.  
  388.     8)  Assume no hierarchy is given with the database (for example, color
  389.     change cannot be used to signal a clustering).  The ray tracing program
  390.     itself can create its own hierarchy, of course.
  391.  
  392.     9)  Timing costs should be separated into at least two areas: preprocessing
  393.     and ray-tracing.  Preprocessing includes all time spent initializing,
  394.     reading the database, and creating data structures needed to ray-trace.
  395.     Preprocessing should be all the constant cost operations--those that
  396.     do not change with the resolution of the image.  Ray-tracing is the
  397.     time actually spent tracing the rays (i.e. everything that is not
  398.     preprocessing).
  399.  
  400.     10) Other timing costs which would be of interest is a breakdown of
  401.     times spent in the preprocessing and for actual ray-tracing.  Examples
  402.     include time spent creating a hierarchy, octree, or item buffer, and
  403.     times spent on intersection the various primitives and on calculating
  404.     the color.
  405.  
  406.     One major complaint with simple timing tests is that they tell little about
  407. the actual algorithm performance per se.  One partial remedy to this problem is
  408. to also include in statistics the number of object intersection tests performed
  409. and the number of hits recorded.  This information is useful for comparing
  410. techniques.  One example would be comparing various automatic hierarchy
  411. algorithms by using these statistics.
  412.  
  413.     Other information should be included in ray-trace timing results that is
  414. often overlooked or ignored.  Some basic information about the system
  415. configuration should be made: average speed of machine in terms of mips,
  416. Mflops, or Vaxen (i.e. the HP 320 is about 75 Kflops (single), which is about
  417. 30% of the speed of a VAX 11/780 FPA running vms 4.1, which is rated at 250
  418. Kflops.  However, an HP hardware engineer told me that the HP 320 is twice
  419. the speed of an 11/780 - it is unclear if this was incorrect.  He might be
  420. right about overall machine speed in MIPS, for example); physical memory
  421. size (i.e. 6 Mbytes); special hardware such as a floating point accelerator or
  422. array processor, if different than the standard machine; system costs during
  423. tests (i.e. single user mode vs. time-share with other heavy users vs. serious
  424. operating system overhead); operating system (i.e. HP-UX version 5.2); and
  425. language used (i.e. optimized "C", single precision in general).
  426.  
  427.  
  428. Timings
  429. -------
  430.  
  431. Rendering time for test set on HP-320SRX:
  432.  
  433.                    Vector (seconds)           |         Z-buffer (seconds)
  434.               512 x 512     1024 x 1024       |     512 x 512       1024 x 1024
  435. balls           369.03          380.32        |       284.52            320.93
  436. gears             6.19            5.26        |         6.84              4.82
  437. mountain          4.83            4.37        |         3.84              2.88
  438. rings           232.28          243.65        |       181.28            202.11
  439. tetra             2.24            2.08        |         1.85              1.40
  440. tree            226.54          236.44        |       176.17            196.68
  441.  
  442.  
  443. Calculated performance of test set on HP-320SRX:
  444.  
  445.                Vector (vectors/second)        |       Z-buffer (polys/second)
  446.               512 x 512     1024 x 1024       |     512 x 512       1024 x 1024
  447. gears            8937           10513         |        1365              1940
  448. mountain         5563            6154         |        2331              3115
  449. tetra            5496            5908         |        2216              2925
  450. -------------------------------------------------------------------------------
  451. Display average  6665            7525         |        1971              2660
  452. (display average vector length for 512x512 is 10.4 pixels, 1024x1024 is  20.8)
  453. (display average polygon size  for 512x512 is 87.4 pixels, 1024x1024 is 349.6)
  454.  
  455.  
  456.                Vector (vectors/second)        |       Z-buffer (polys/second)
  457.               512 x 512     1024 x 1024       |     512 x 512       1024 x 1024
  458. balls           11521           11179         |        4981              4416
  459. rings           11572           11032         |        4819              4322
  460. tree            11569           11084         |        4835              4331
  461. -------------------------------------------------------------------------------
  462. Throughput ave. 11554           11098         |        4878              4356
  463. (throughput ave. vector length for 512x512 is 1.1 pixels, 1024x1024 is 2.3)
  464. (throughput ave. polygon size  for 512x512 is 1.1 pixels, 1024x1024 is 4.4)
  465.  
  466.  
  467. The above times are computed from the average of 5 runs for each database.
  468. The timing increment is 0.02 seconds (50 Hz).  Variance over the runs was
  469. quite small.  Note that many of the tests at maximum square resolution
  470. (1024 x 1024) for the hidden surface timings are faster than those for the low
  471. resolution (512 x 512).  The HP-320SRX is a workstation with 6 MByte memory and
  472. floating point accelerator.  24 bit color was used for display, and the full
  473. screen resolution is 1280 x 1024.
  474.  
  475.  
  476. Rendering time of the ray-traced test set on HP-320SRX (512 x 512 pixels):
  477.  
  478.            Setup    Ray-Tracing  |  Polygon    Sphere     Cyl/Cone    Bounding
  479.               (hr:min:sec)       |   Tests      Tests       Tests    Vol. Tests
  480. -------------------------------------------------------------------------------
  481. balls      13:24      4:36:48    |   1084K      6253K         0        41219K
  482. gears      13:49     10:32:51    |  12908K        0           0        92071K
  483. mountain   11:46      2:59:58    |   3807K      4193K         0        31720K
  484. rings      31:56     13:30:40    |   1203K      5393K      15817K      94388K
  485. tetra       4:04        15:40    |    342K        0           0         1491K
  486. tree        7:37      3:43:23    |   1199K      2218K        973K      20258K
  487.  
  488. A typical set of ray tracing intersection statistics for the tetra database is:
  489.  
  490. [these statistics should be the same for all users]
  491.   image size: 512 x 512
  492.   total number of pixels: 262144            [ 512 x 512 ]
  493.   total number of trees generated: 263169        [ 513 x 513 ]
  494.   total number of tree rays generated: 263169        [ no rays spawned ]
  495.   number of eye rays which hit background: 213363    [ 81% ]
  496.   average number of rays per tree: 1.000000
  497.   average number of rays per pixel: 1.003910
  498.   total number of shadow rays generated: 46150
  499.  
  500. [these tests vary depending on the ray-tracing algorithm used]
  501. Ray/Item Tests Performed:
  502.   Polygonal:       342149 (     55495 hit -  16.2 % )
  503.   Bounding Box:   1491181 (    351754 hit -  23.6 % )
  504.   Total:          1833330 (    407249 hit -  22.2 % )
  505.  
  506.     Setup times are dominated by a verbose data format which causes a massive
  507. (usually tenfold) increase in size from the NFF file format to our in-house
  508. format.  It should also be noted that for my sphere and bounding volume tests
  509. there are more tests than are strictly needed.  This is because I require each
  510. light to be attached to an object (a sphere), which leads to extra testing in
  511. both of these categories.
  512.  
  513.     For what it's worth, my ray-tracer is based on hierarchical bounding boxes
  514. generated using Goldsmith & Salmon's automatic hierarchy method (see IEEE CG&A
  515. May 1987) and uses an item buffer (no light buffer yet) and shadow coherency.
  516. Something to think about is how the octree, SEADS, and other such algorithms
  517. perform when the background polygon dimensions are changed (thus changing the
  518. size of the outermost enclosing box, which changes the octree encoding of the
  519. environment).  Same question with the effects on the algorithms of moving light
  520. source positions along the line defined by the light and "lookat" positions.
  521.  
  522.  
  523. Future Work
  524. -----------
  525.  
  526.     These databases are not meant to be the ultimate in standards, but are
  527. presented as a first attempt at providing somewhat representative modelled
  528. environments.  A number of extensions to the file format should be provided
  529. someday, along with new database generators which use them.  The present
  530. databases do not contain holed polygons, spline patches, polygonal mesh or
  531. triangular strip data structures, or other proposed PHIGS+ extensions.
  532. Modeling matrices are not output, and CSG combined primitives are not included.
  533.  
  534.     As far as database geometry is concerned, most scenes have a preponderance
  535. of small primitives, and in general very few objects ever get clipped.  If you
  536. find that these databases do not reflect the type of environments you render,
  537. please write and explain why (or better yet, write one or more programs that
  538. will generate your "typical" environments--maybe it will get put in the next
  539. release).
  540.  
  541.  
  542. Acknowledgements
  543. ----------------
  544.  
  545.     I originally heard of this idea from Don Greenberg back in 1984.  Some time
  546. earlier he and Ed Catmull had talked over coming up with some standard
  547. databases for testing algorithmic claims, and to them must go the credit for
  548. the basic concept.  Many thanks to the reviewers, listed alphabetically:  Kells
  549. Elmquist, Jeff Goldsmith, Donald Greenberg, Susan Spach, Rick Speer, K.R.
  550. Subramanian, John Wallace, and Louise Watson.  Other people who have freely
  551. offered their ideas and opinions on this project include Brian Barsky, Andrew
  552. Glassner, Roy Hall, Chip Hatfield, Tim Kay, John Recker, Paul Strauss, and Chan
  553. Verbeck.  These names are mentioned mostly as a listing of people interested in
  554. this idea.  They do not necessarily agree (and in some cases strongly disagree)
  555. with the validity of the concept or the choice of databases.
  556.  
  557.     Your comments and suggestions on these databases are appreciated.  Please
  558. send any timing results for software and hardware which you test.
  559.